package com.laxia.dao;

import com.laxia.mybatis.BaseDomain;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;

public interface BaseDAO<T extends BaseDomain> {


    T selectByPrimaryKey(Object key);
    T findValidOne(Long id);

    List<T> findAll();
    List<T> findByIds(Collection<Long> ids);
    List<T> selectByExample(Object example);

    Map<Long, T> mapByIds(Set<Long> ids);

    int insert(T object);

    int insertSelective(T object);

    int insertListSelective(List<T> objects);

    int updateByPrimaryKeySelective(T object);

    int save(T object);
}
